﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeBehind="Parts.aspx.cs" Inherits="SEP.Admin.Parts" %>
    
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajt" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" runat="server">
Parts
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphBody" runat="server">
<asp:ScriptManager ID="scriptmananger1" runat="server" />
    <asp:LinkButton ID="btnNewPart" Text="Create a part" runat="server" OnClick="btnNewPart_Click" />
    <br />
    <br />
    <asp:GridView ID="grvParts" runat="server" AutoGenerateColumns="False" EmptyDataText="No parts at this time.">
        <Columns>
            <asp:BoundField HeaderText="Description" DataField="DESCRIPTION" />
            <asp:BoundField HeaderText="Number" DataField="NUMBER" />
            <asp:BoundField HeaderText="Price" DataField="PRICE" DataFormatString="{0:C}" />
        </Columns>
    </asp:GridView>    
    <%--start part modal--%>
    <ajt:ModalPopupExtender ID="modalNewPart" runat="server" CancelControlID="btnPartCancel"
        TargetControlID="btnNewPart" PopupControlID="pnlNewPart" PopupDragHandleControlID="PopupHeader"
        Drag="true" BehaviorID="ShowPartModal" BackgroundCssClass="modalBackground">
    </ajt:ModalPopupExtender>
    <asp:Panel ID="pnlNewPart" runat="server">
        <div id="modalPart">
            <div class="modal">
                <table width="300" border="0">
                    <tr>
                        <td align="center" colspan="2">
                            <p>Create an part</p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lblPartError" runat="server" CssClass="errorLabel" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Description:
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtDescription" runat="server" MaxLength="1000" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Number:
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtNumber" runat="server" MaxLength="1000" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Price:
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtPrice" runat="server" MaxLength="12" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <asp:Button ID="btnPartCancel" runat="server" Text="Cancel" />
                        </td>
                        <td align="right">
                            <asp:Button ID="btnPartSubmit" runat="server" Text="Create" CausesValidation="false"
                                OnClick="btnPartSubmit_Click" OnClientClick="showPartModal();" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </asp:Panel>
    <%--end part modal--%>
</asp:Content>
